package gui;

import org.eclipse.swt.widgets.*;

import TimerLogs.*;
import Images.*;
import Resizers.*;

public class Main 
{	
	private static Display _display;

	public static void main(String[] args) 
	{
		_display = new Display();
		MemoryImage image = new MemoryImage();
		
		CanvasDlg canvas = new CanvasDlg(_display, image);
		SettingDlg settingDlg = new SettingDlg(_display, image, canvas);
		
		{
			Resizer resizer = new NNResizer();
			resizer.SetLogger(new LabelLog(settingDlg.LoggingLabel()));
			image.setResizer(resizer);
		}
		
		settingDlg.Show();
		
		while (!settingDlg.IsDisposed()) 
    	{
        	if (!_display.readAndDispatch())
            	_display.sleep();
    	}

    	_display.dispose();
	}
}
